<template>
    <mt-tabbar v-model="childTab" fixed>
        <mt-tab-item id="wei" @click.native="move(0,'/img/tabbar/msg(1).png','wei')">
            <img slot="icon" :src="src_arr[0]">
            微信
        </mt-tab-item>
        <mt-tab-item id="tel" @click.native="move(1,'/img/tabbar/tel(1).png','tel')">
            <img slot="icon" :src="src_arr[1]">
            通讯录
        </mt-tab-item>
        <mt-tab-item id="find" @click.native="move(2,'/img/tabbar/search(1).png','find')">
            <img slot="icon" :src="src_arr[2]">
            发现
        </mt-tab-item>
        <mt-tab-item id="my" @click.native="move(3,'/img/tabbar/my(1).png','my')">
            <img slot="icon" :src="src_arr[3]">
            我
        </mt-tab-item>
    </mt-tabbar>
</template>

<script>
export default {
    props:["tab"],
    data(){
        return {
            src_arr:["/img/tabbar/msg(1).png","/img/tabbar/tel.png","/img/tabbar/search.png","/img/tabbar/my.png"],
            childTab:"wei"
        }
    },
    methods:{
        shu(){
            console.log(1);
        },
        move(i,url,id){
            var arr = ["/img/tabbar/msg.png","/img/tabbar/tel.png","/img/tabbar/search.png","/img/tabbar/my.png"];
            arr[i] = url;
            this.src_arr = arr;
            this.$emit("listenId",id);
        },
    }
    
}
</script>

<style>
</style>